
package logowanie;

import java.sql.*;


public class MySqlConnect {
    
    static Connection con =null;
 
    
    public static Connection ConnectDb(){
    try{
        String DB_CONN_STRING = "jdbc:mysql://www.c0re.us:3306/test";
        String DRIVER_CLASS_NAME = "org.gjt.mm.mysql.Driver";
        String USER_NAME = "admin_balu";
        String PASSWORD = "123Balu";
        Class.forName("com.mysql.jdbc.Driver");
        con = DriverManager.getConnection(DB_CONN_STRING,USER_NAME,PASSWORD);
       // st = con.createStatement();
        return con;
    
    }catch(Exception ex){
        System.out.println("Error: "+ex);
        return null;
    }   
   } 
}

